package com.xls.boxlibrary.entity;

import java.io.Serializable;
import java.util.List;

public class PageEntity<T> implements Serializable {

    /**
     * countId : string
     * current : 0
     * maxLimit : 0
     * optimizeCountSql : true
     * orders : [{"asc":true,"column":"string"}]
     * pages : 0
     * records : [{"appId":0,"appUserId":0,"coins":0,"createTime":"2023-08-25T02:59:56.831Z","id":0,"status":0,"updateTime":"2023-08-25T02:59:56.831Z"}]
     * searchCount : true
     * size : 0
     * total : 0
     */

    private String countId;
    private long current;
    private long maxLimit;
    private boolean optimizeCountSql;
    private long pages;
    private boolean searchCount;
    private long size;
    private long total;
    private List<OrdersBean> orders;
    private List<T> records;

    public List<T> getRecords() {
        return records;
    }

    public void setRecords(List<T> records) {
        this.records = records;
    }

    public String getCountId() {
        return countId;
    }

    public void setCountId(String countId) {
        this.countId = countId;
    }

    public long getCurrent() {
        return current;
    }

    public void setCurrent(long current) {
        this.current = current;
    }

    public long getMaxLimit() {
        return maxLimit;
    }

    public void setMaxLimit(long maxLimit) {
        this.maxLimit = maxLimit;
    }

    public boolean isOptimizeCountSql() {
        return optimizeCountSql;
    }

    public void setOptimizeCountSql(boolean optimizeCountSql) {
        this.optimizeCountSql = optimizeCountSql;
    }

    public long getPages() {
        return pages;
    }

    public void setPages(long pages) {
        this.pages = pages;
    }

    public boolean isSearchCount() {
        return searchCount;
    }

    public void setSearchCount(boolean searchCount) {
        this.searchCount = searchCount;
    }

    public long getSize() {
        return size;
    }

    public void setSize(long size) {
        this.size = size;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public List<OrdersBean> getOrders() {
        return orders;
    }

    public void setOrders(List<OrdersBean> orders) {
        this.orders = orders;
    }

    public static class OrdersBean {
        /**
         * asc : true
         * column : string
         */

        private boolean asc;
        private String column;

        public boolean isAsc() {
            return asc;
        }

        public void setAsc(boolean asc) {
            this.asc = asc;
        }

        public String getColumn() {
            return column;
        }

        public void setColumn(String column) {
            this.column = column;
        }
    }
}
